<{include file="admin/header.html"}>
<script type="text/javascript">
function filterp(){
	url = '<{$smarty.const.APPLICATION_URL}>/admin/category';
	if (document.filter.name.value != '')
		url += '/name/' + document.filter.name.value;
	window.location = url;
}
</script>
<div class="tabs">
    <div class="panel-header-select">
		<label><{#_LB_CATEGORY#}></label>
	</div>
</div>
<div class="buttons_action" align="right">
	<button type="button" onClick="filterp()">
	    <img alt="" src="<{$smarty.const.STATIC_COMPONENT_URL}>images/search_16.png"/>
	    <{#_LB_SEARCH#}>
	</button>	
	<button type="button" onClick="window.location='<{$smarty.const.APPLICATION_URL}>/admin/category/action/add'">
	    <img alt="" src="<{$smarty.const.STATIC_COMPONENT_URL}>images/add_16.png"/>
	    <{#_LB_ADD#}>
	</button>
</div>
<br>
<form name="filter" method="post" action="">
<table>
	<tr>
		<td><{#_LB_CATEGORY_NAME#}>: </td>
		<td><input name="name" type="text" value="<{$category_name|utf8_escape_html}>" /></td>
		<td width="20"></td>
	</tr>
</table>
</form>
<table class="grid">				
	<tr class="head">
        <td width="10%"><{#_LB_CATEGORY_ID#}></td>	
		<td width="20%"><{#_LB_CATEGORY_NAME#}></td>	
		<td width="10%"><{#_LB_FUNCTION#}></td>				
	</tr>
	<{while $category->fetch()}>
		<tr>
            <td><{$category->id}></td>
			<td><{$category->name}></td>
			<td>
				<a href="<{$smarty.const.APPLICATION_URL}>/admin/category/action/edit/id/<{$category->id}>" title="edit" >
					<img border=0 alt="edit_small.png" src="<{$smarty.const.STATIC_COMPONENT_URL}>images/edit_small.png"/>						
				</a>		
				
				<a onclick="return confirm('<{#_LB_DELETE_CONFIRM#}>')" href="<{$smarty.const.APPLICATION_URL}>/admin/category/action/delete/id/<{$category->id}>" title="delete" >
					<img border=0 alt="delete_small.png" src="<{$smarty.const.STATIC_COMPONENT_URL}>images/delete_small.png"/>						
				</a>		
			</td>
		</tr>
	<{/while}>	
</table>	

<div align="right">
	<{include file='pager.html' data=$category->getPaginationData() url_base=$url_base}>
</div>


<{include file="admin/footer.html"}>